
try:
    from .s7_client import S7Client
    from .s7_client_sim import SimClient
except:
    from s7_client import S7Client
    from s7_client_sim import SimClient
class Lay1PLCFactory: #
    @staticmethod
    def create(class_type, ip='127.0.0.1', port=1102, dbnumber=183):
        if class_type == "s7_tcp":
            return S7Client(ip=ip, port=port, dbnumber=dbnumber)
        elif class_type == "sim":
            return SimClient(ip=ip, port=port, dbnumber=dbnumber)
        else:
            raise ValueError("Invalid transport type")